package owl2vowl;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Import;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import owl2vowl.knowledgebase.datasources.DynamicDataSourceConfig;
import owl2vowl.knowledgebase.util.PollCodeUtil;

@EnableTransactionManagement
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@Import({ DynamicDataSourceConfig.class }) 
public class KnowledgeBaseMain extends SpringBootServletInitializer {
	public static void main(String[] args) {
//		if(checkPoll()){
			SpringApplication.run(KnowledgeBaseMain.class, args);
//		}else{
//			System.out.println("本机未进行注册。。。");
//		}
		
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(KnowledgeBaseMain.class);
	}

	
	public static boolean checkPoll(){
		return PollCodeUtil.check();
	}
}



















































